@charset "UTF-8";

.crop-container {
    display: flex;
    justify-content: center;
    height: 40px;
    background-color: #313239;

    .crop-slider {
        position: relative;
        display: flex;
        align-items: center;
        width: 400px;
        height: 100%;
        padding: 0 10px;
        background-color: #313239;
        border: 1px solid #46484d;
        border-top: none;
        border-bottom: none;
        user-select: none;

        * {
            box-sizing: border-box;
        }
        .crop-time-line-container {
            position: relative;
            flex: 1;
            height: 100%;

            .crop-time-line {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                width: 100%;
                height: 4px;
                background-color: rgba(255, 255, 255, 0.5);
                border-radius: 2px;
            }
        }

        .media-duration {
            margin-left: 5px;
            width: 55px;
            font-size: 14px;
            color: #fff;
        }

        .cursor-time-hint {
            position: absolute;
            left: 0;
            width: 2px;
            height: 100%;
            opacity: 0;
            will-change: transform;

            .cursor-line {
                position: relative;
                height: 100%;
                background-color: #fff;

                .cursor-sensor {
                    position: absolute;
                    width: 6px;
                    height: 100%;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                }
            }

            .cursor-time {
                position: absolute;
                font-size: 12px;
                line-height: 24px;
                padding: 2px 4px;
                top: -35px;
                left: 50%;
                transform: translateX(-50%);
                background-color: #1795ff;
                border-radius: 4px;

                &:after {
                    position: absolute;
                    left: 50%;
                    bottom: 0;
                    transform: translate(-50%, 10px);
                    display: block;
                    content: '';
                    width: 0;
                    height: 0;
                    border: 5px solid #1795ff;
                    border-right-color: transparent;
                    border-bottom-color: transparent;
                    border-left-color: transparent;
                }
            }

        }


        .cropping {
            opacity: 1;

            .cursor-time {
                color: #1795ff;
                background-color: #fff;

                &:after {
                    border-top-color: #fff;
                }
            }
        }
        .crop-moving-cursor {
            opacity: 1;

            &:before {
                content: '';
                display: block;
                position: absolute;
                top: 50%;
                left: 0;
                transform: translate(-10px, -50%);
                width: 0;
                height: 0;
                border: 4px solid #fff;
                border-top-color: transparent;
                border-bottom-color: transparent;
                border-left-color: transparent;
            }

            &:after {
                content: '';
                display: block;
                position: absolute;
                top: 50%;
                right: 0;
                transform: translate(10px, -50%);
                width: 0;
                height: 0;
                border: 4px solid #fff;
                border-top-color: transparent;
                border-bottom-color: transparent;
                border-right-color: transparent;
            }

            .cursor-time {
                color: #fff;
                background-color: #1795ff;
            }
        }

        .moving-cursor {
            opacity: 1;
            color: #fff;
        }

        .crop-range {
            position: absolute;
            left: 0;
            height: 100%;
            background-color: rgba(23, 149, 255, 0.2);
        }

        .crop-range-hover {
            background-color: rgba(23, 149, 255, 0.6);
        }

        .crop-range-dragging {
            background-color: rgba(23, 149, 255, 0.6);
        }
    }

    .crop-panel {
        position: relative;
        display: flex;
        height: 100%;
        margin-left: 10px;
        background-color: #313239;

        * {
            box-sizing: border-box;
        }

        .small-btn {
            padding: 0 3px;
            height: 24px;
            font-size: 12px;
            line-height: 24px;
            text-align: center;
            color: #fff;
            border: none;
            background: none;
            cursor: pointer;
        }

        .crop-time-area {
            position: absolute;
            left: 0;
            bottom: 40px;
            background-color: #313239;
            .crop-time-header {
                display: flex;
                align-items: center;
                width: 100%;
                height: 32px;
                padding: 0 10px;
                border: 1px solid #46484d;

                .header-crop-icon {
                    background-position: 24px 0;
                    cursor: auto;
                }

                .text {
                    flex-grow: 1;
                    font-size: 14px;
                    text-align: left;
                    color: #fff;
                }
            }

            .crop-time-body {
                overflow-y: auto;
                overflow-x: hidden;
                transition: height .5s;

                &[data-count="0"] {
                    height: 0;
                }

                &[data-count="1"] {
                    height: 40px;
                }

                &[data-count="2"] {
                    height: 80px;
                }

                &[data-count="3"] {
                    height: 120px;
                }

                &[data-count="4"] {
                    height: 160px;
                }

                &[data-count="5"] {
                    height: 200px;
                }

                &[data-count="6"] {
                    height: 240px;
                }

                &[data-count="7"] {
                    height: 280px;
                }

                &[data-count="8"] {
                    height: 320px;
                }

                &[data-count="9"] {
                    height: 360px;
                }

                &[data-count="10"] {
                    height: 380px;
                }
            }

            .crop-time-body-hide {
                height: 0;
            }
        }

        .crop-time-item {
            display: flex;
            align-items: center;
            height: 40px;
            padding: 0 10px;

            &[data-highlight="1"] {
                background-color: #40414a;
            }
            &:hover {
                background-color: #40414a;
            }
        }

        .time-area {
            flex-grow: 1;
            display: flex;
            justify-content: space-around;
            align-items: center;

            .time-input-area {
                display: flex;
                align-items: center;
                justify-content: space-around;
                width: 128px;
                height: 24px;
                line-height: 24px;
                border: 1px solid #46484d;

                .time-text {
                    font-size: 12px;
                    color: #fff;
                }

                .time-input {
                    display: flex;
                    justify-content: space-between;
                    width: 65px;
                    font-size: 14px;
                    text-align: center;
                    color: #9b9b9b;
                    border: none;
                    background: none;

                    input {
                        width: 20px;
                        padding: 0 1px;
                        background: none;
                        border: none;
                        color: #9b9b9b;
                    }
                }
            }

            .range-text {
                font-size: 20px;
                color: #9b9b9b;
            }
        }

        .confirm-btn {
            margin: 8px;
            width: 80px;
            height: 24px;
            line-height: 24px;
            text-align: center;
            border-radius: 4px;
            color: #fff;
            background-color: #ff991b;
            cursor: pointer;
        }

        .confirm-btn-disabled {
            background-color: #9b9b9b;
            cursor: wait;
        }
    }
}